<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for标签</title>
</head>
<body>
    <!--表格-->
    <table>
        <!--表头-->
        <thead>
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>作者</th>
            </tr>
        </thead>
        <!--表内容-->
        <tbody>
            {% for book in books reversed %}
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ book.name }}</td>
                    <td>{{ book.auther }}</td>
                </tr>
            {% empty %}
                <tr>没有任何图书</tr>
            {% endfor %}
        </tbody>
    </table>

    <div>
        {% for key, value in person.items %}
            <p>{{ key }} : {{ value }}</p>
        {% endfor %}
    </div>
</body>
</html>